package com.xingkeduo.pojo.enums;

/**
 * 文件概述
 *
 * @author wangxilong <wangxilong@xingkeduo.com>
 * @version id:v0.1 19-1-7 下午3:24
 * @package BeautyOS
 * @copyright Copyright (c) XKD 2019
 */
public enum UseStatus {
    INIT(0, "初始"),
    OPEN(1, "开启"),
    CLOSE(2, "关闭");

    private Integer value;

    private String desc;

    UseStatus(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    //获取枚举对象
    public static UseStatus get(Integer value){
        for(UseStatus useStatus:UseStatus.values())
            if (useStatus.getValue().equals(value)) {
                return useStatus;
            }
        return null;
    }

}
